import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        //设计一个简易的计算器程序，可进行两个实数的+ - * /运算switch
        Scanner stdIn = new Scanner(System.in);

        float x, y;
        System.out.print("请输入x值：");
        x = stdIn.nextFloat();
        System.out.print("请输入y值: ");
        y = stdIn.nextFloat();
        System.out.print("请选择一个符号: ");
        char k = stdIn.next().charAt(0);
        switch (k) {
            case '+':
                System.out.println(x + "+" + y + "=" + (x + y));break;
            case '-':
                System.out.println(x + "-" + y + "=" + (x - y));break;
            case '*':
                System.out.println(x + "*" + y + "=" + (x * y));break;
            case '/':
                System.out.println(x + "/" + y + "=" + (x / y));break;
        }


    }
}
